# 导包
import unittest
from lib.HTMLTestReportCN import HTMLTestRunner
from script.test01_login import TestLoginAPI
from script.test02_employee import TestEmployeeAPI
# 封装测试套件
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestLoginAPI))
suite.addTest(unittest.makeSuite(TestEmployeeAPI))
# 指定报告路径及名称
report = "./report/iHRMreport.html"
# 打开文件流
with open(report, "wb") as a:
    # 创建执行器
    runner = HTMLTestRunner(a, title="iHRM报告")
    # 执行测试套件
    runner.run(suite)
